/*
 * File:    ClassLoaderInterface.java
 * Created: 14-Nov-2007
 * 
 * by Kenji Hollis <kenji@bitgatesoftware.com>
 * Released under the Creative Commons License version 2.5
 */

package com.bitgate.util.dynaload;

/**
 * This class loader interface provides a way to request class files from an external source by class name.  It also
 * provides a way to serialize that class, meaning, it can be moved from it transport and installed into a jar file or
 * another location for permanent local use.
 * 
 * @author Kenji Hollis &lt;kenji@bitgatesoftware.com&gt;
 * @since 0.1
 */
public interface ClassLoaderInterface {
	
	/**
	 * Requests a class by location, by classname.
	 * 
	 * @param location The location to load the class from.
	 * @param classname The class name to retrieve.
	 * @return <code>Class&lt&gt;</code> object from the request, <code>null</code> if not found.
	 */
	Class<?> requestClass(String location, String classname);
	
	/**
	 * Serializes a class by URL for a classname.
	 * 
	 * @param location The location to load the class from.
	 * @param url The URL to load.
	 * @param classname The class name to serialize.
	 */
	void serializeClass(String location, String url, String classname);
	
}